package com.example.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.example.entity.supervision.ElevatorUsedInspection;
import com.example.service.ElevatorUsedInspectionService;

import io.swagger.annotations.ApiOperation;

/**
 * Created by douyx on 2018/03/26.
 */
@RestController
@RequestMapping("api/eleUsedInspect")
public class ElevatorUsedInspectionController {

	@Autowired
	ElevatorUsedInspectionService elevatorUsedInspectionService;

	@ApiOperation(value = "查询信息", notes = "查询信息")
	@RequestMapping(value = "/query/{id}", method = RequestMethod.POST)
	Map<String, Object> query(@PathVariable String id) {
		return elevatorUsedInspectionService.query(id);
	}

	@ApiOperation(value = "新增信息", notes = "新增信息")
	@RequestMapping(value = "/add", method = RequestMethod.POST)
	Map<String, Object> add(@RequestBody ElevatorUsedInspection elevatorUsedInspection) {
		return elevatorUsedInspectionService.add(elevatorUsedInspection);
	}
}
